﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace JTTD.Domain.Dtos.CompanyUserInfo.Request
{
    /// <summary>
    /// 修改店铺信息
    /// </summary>
    public  class UpdateShopInfoRequestDto
    {
        /// <summary>
        /// 用户名/店家名称
        /// </summary>
        [MaxLength(50,ErrorMessage ="店家名称不能超过25个汉字")]
        [Required(ErrorMessage ="店家名称不能为空")]
        public string UserName { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [MaxLength(20, ErrorMessage = "联系方式不能超过20个字符")]
        [Required(ErrorMessage = "联系方式不能为空")]
        [DataType(DataType.PhoneNumber,ErrorMessage ="联系方式格式错误")]
        public string Phone { get; set; }

        /// <summary>
        /// 头像链接
        /// </summary>
        [MaxLength(200, ErrorMessage = "头像链接地址不能超过200个字符")]
        [Required(ErrorMessage = "头像链接地址不能为空")]
        public string HeadUrl { get; set; }

        /// <summary>
        /// 楼层
        /// </summary>
        [Range(1,4,ErrorMessage ="楼层只能在1-4之间")]
        public int Floor { get; set; } = 1;

        /// <summary>
        /// 楼层地址
        /// </summary>
        [MaxLength(20, ErrorMessage = "楼层地址不能超过20个字符")]
        [Required(ErrorMessage = "楼层地址不能为空")]
        public string Address { get; set; }

        /// <summary>
        /// 店铺类型
        /// </summary>
        [Required(ErrorMessage = "店铺类型不能为空")]
        public string ShopType { get; set; }

        /// <summary>
        /// 店铺简介
        /// </summary>
        public string ShopDetail { get; set; }
    }
}
